-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pundit Integration #2399
Pundit Integration #2399
Conversation
@jayasi The tests are failing on Travis CI? The problem appears to be:
Can you please look into fixing that? |
Version-specific Gemfiles under
will do the job. |
@@ -3,6 +3,7 @@ class MainController < RailsAdmin::ApplicationController | |||
include ActionView::Helpers::TextHelper | |||
include RailsAdmin::MainHelper | |||
include RailsAdmin::ApplicationHelper | |||
include Pundit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes Pundit required dependency, we should make it optional choice.
c784666
to
3a7e286
Compare
@record = record | ||
end | ||
|
||
def rails_admin?(action) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this issue?
We really need to get rid of this ugly case-when chain.
@sferik, @mshibuya, I've removed the need for the case-when chain by modifying the authorization adapter. The CI test that is failing is for Ruby 2.2, but I am unable to reproduce it locally. I tried
And all tests are passing. |
Merged in 🔨 |
@jayasi @meghaarora42 Additionally, you may be interested in creating Wiki entry, which will promote use of this change. |
@mshibuya Thank you 😄 We will create the wiki entry. |
@mshibuya Thank you for all the help! :D |
👏🏼 |
Do you have a timeline for a (minor) release that includes this? I've already started using rails_admin with pundit (:clap: :clap: :clap:), but I'd rather not install from master branch. Thanks! |
@jayasi Did you ever create a wiki entry for this? I'm not seeing one. I'm wondering how access to the RailsAdmin dashboard is supposed to be authorized. I'm seeing RailsAdmin trying to call Some guidance on how to use the |
I also see it trying to call |
+1 would appreciate a wiki on this. PS.: I liked the nested approach more, it gave you more power: bf63d68 |
Anyone figured out how to use this? |
Any time frame for updating the documentation on this? |
a wiki is of course needed but in the meantime ... https://github.com/sferik/rails_admin/blob/ba2088c6ecabd354b4b67c50bb00fccdbd1e6240/spec/integration/authorization/pundit_spec.rb |
Since rails_admin 1.0 stable (worked in rc1) I am getting an |
Integration of the Pundit gem. #2120